# ihrm登录接口 接口对象层

# 定义ihrm登录接口类
import requests

class IhrmLoginApi():
    # 定义方法
    @classmethod
    def login(cls,req_data):
        resp = requests.post(url="https://ihrm-java.itheima.net/api/sys/login",json=req_data)
        return resp
# 测试接口封装书否成功
if __name__ == '__main__':
    data = {"mobile":"13800000002","password":"929itheima.CN032@.20250523"}
    resp = IhrmLoginApi.login(data)
    print("登陆成功",resp.json())